/*
 * Copyright 2010 Marcin Blazejewski
 *
 * This file is part of Nofate.
 *
 * Nofate is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Nofate is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Nofate. If not, see <http://www.gnu.org/licenses/>.
 *
 */


#ifndef FOV_H_
#define FOV_H_

#include <list>

#define FOV_NONE                   0
#define FOV_DARK                   1
#define FOV_OBSTACLE               2
#define FOV_LIT                    3
#define FOV_FOG                    4

#define TRUE                        1
#define FALSE                       0

typedef struct TFovPoint
{
    int             x, y;
    int             shadowX, shadowY;
    int             offsetX, offsetY;
    struct          TFovPoint *xInput, *yInput;
    char            state;
    char            active;
    int             value;
} FovPoint;
    

void            fp_reset(FovPoint *fp, int x, int y);
void            fp_process(FovPoint *fp, int alpha);
void            fp_expand(FovPoint *fp, std::list<FovPoint*> &active, FovPoint** fovmap, int ox, int oy, int maxx, int maxy);



#endif
